package com.sptpc.demo.global.exception;

import com.sptpc.demo.global.response.BusinessStatusCode;
import lombok.Getter;

public class BusinessException extends RuntimeException {
    @Getter
    private BusinessStatusCode error;

    public BusinessException(BusinessStatusCode errCode){
        super(errCode.name());
        error=errCode;
    }

    public BusinessException(String errMsg){
        super(errMsg);
       error=BusinessStatusCode.UNKNOW_ERROR;
    }
}
